package top.zlhy7.module.work.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import top.zlhy7.base.BaseEntity;

import java.util.Date;

/**
 * @author renyong
 * @date 2024/9/29 19:33
 * @description 工单
 */
@Data
@TableName("word_order")
public class WordOrder extends BaseEntity {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 工单编号
     */
    @NotBlank(message = "工单编号不能为空")
    @Length(max = 30, message = "工单编号长度不能超过{max}个字符")
    private String orderNo;
    /**
     * 工单类型0交办1直接答复3无效工单
     */
    @NotNull(message = "工单类型不能为空")
    @Range(min = 0, max = 3, message = "工单类型取值范围[0,3]")
    private Integer orderType;
    /**
     * 工单标题
     */
    @NotBlank(message = "工单标题不能为空")
    @Length(max = 30, message = "工单标题长度不能超过{max}个字符")
    private String title;
    /**
     * 工单内容
     */
    @NotBlank(message = "工单内容不能为空")
    private String content;
    /**
     * 处理部门id
     */
    private Long handleDeptId;
    /**
     * 分派时间
     */
    private Date fenpaiTime;
    /**
     * 是否超期0否1是
     */
    @Range(min = 0, max = 1, message = "是否超期取值范围[0,1]")
    private Integer isOverdue;
}
